<@override name="head">
<title>创意中心</title>
<script type="text/javascript" src="${ctx}/assets/js/lib/bootstrap.min.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/lib/bootbox.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/lib/jquery.ui.widget.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/lib/jquery.iframe-transport.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/lib/jquery.fileupload.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/common/table.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/common/dropDownList.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/advertiser/banner.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/layer/layer.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/lib/moment.min.js"></script>
<!--
<script type="text/javascript" src="${ctx}/assets/js/advertiser/bannerTemplateWin.js"></script>
-->
</@override> 
<@override name="body">
<div id=content_bg>
<#include "/main/home/common.ftl"/>
    <div id="pagecontent">
        <div id="content">
            <div id="navDiv">
                <ul id="navDiv_ul">
                    <li><i class="icon-home"></i></li>
                    <li><a href="${ctx}/advertiser/main/dashboard">首页</a></li>
                    <li><i class="icon-angle-right"></i></li>
                    <li class="navDiv_currentLi">创意中心</li>
                </ul>  
            </div>
            <form id="myform" action="${ctx}/advertiser/main/ad/banner-template/list" method="post">
                <input type="hidden" id="status" name="status" value="${status!}"/>
                <input type="hidden" id="width" name="width" value="${width!}"/>
                <input type="hidden" id="height" name="height" value="${height!}"/>
                <input type="hidden" id="type" name="type" value="${type!}"/>
                <input type="hidden" id="size" name="size" value="${size!}"/>
                <div id="selectuls">
                    <ul id="main_advertiserul">
                        <li class="select_box" id="advertiserul_box">
                            <span id="advertiserul_span">${selectedadvertiserName!}</span>
                            <ul class="son_ul" id="advertiser_son_ul"></ul>
                        </li>
                    </ul>
                    <input type="hidden" name="advertiserId" id="advertiserId" value="${advertiserId!}"/>
                    <input type="hidden" name="selectedadvertiserName" id="advertiserName" value="${selectedadvertiserName!}"/>
                </div>
                <div id="selectBar_size" class="selectBar">
                    <span>创意尺寸：</span>
                    <div class="son_selectBarOther">
                        <a value="">全部</a>
                        <#if sizeList ??>
                        <#list sizeList as size>    
                        <a value="${size.width!}x${size.height!}">${size.width!}x${size.height!}</a>
                        </#list>
                        </#if>
                    </div>
                </div>
                <div id="selectBar_type" class="selectBar">
                    <span>创意类型：</span>
                    <a value="">全部</a>
                    <a value="1">Flash</a>   
                    <a value="2">图片</a>      
                    <a value="3">视频</a>
                </div>
                <div id="selectBar_status" class="selectBar">
                    <span>状态：</span>
                    <a value="">全部</a>
                    <a value="0">正常</a>
                    <a value="1">停用</a>
                </div>
                <div id="navButtons_other">
                    <div id="button">                   
                        <a class="btn2" id="all-btn-upload">
                        创建创意素材<input type="file" id="all-input-file" multiple="mltiple"/>
                        </a>
                        <a class="btn2" id="all-btn-enable">批量开启</a>
                        <a class="btn2" id="all-btn-disable">批量停用</a>
                        <a class="btn2" id="all-btn-delete">批量删除</a>
                    </div>
                    <div id="searchValueDiv">
                        <input type="hidden" id="page" name="page" value="${pager.page}"/>
                        <input id="searchValue" type="text" name="searchValue" value="${searchValue!}" tabindex="1" placeholder="请输入创意名称"/>
                        <input id="serachData_img" type="submit" value=""/>
                    </div>
                </div>
                <table border="1" class="tableFig">
                    <thead>
                        <tr class="theadTr">
                            <th class="theadTh" style="width:5%;"><div class="checkboxStyleTh"></div></th>
                            <th class="theadTh" style="width:5%;">ID</th>
                            <th class="theadTh" style="width:12%;">创意</th>
                            <th class="theadTh" style="width:12%;text-align:left;">创意名称</th>
                            <th class="theadTh" style="width:6%;">创意尺寸</th>
                            <th class="theadTh" style="width:6%;">创意类型</th>
                            <th class="theadTh" style="width:12%;">上传时间</th>
                            <th class="theadTh" style="width:7%;">创意状态</th>
                            <th class="theadTh" style="width:35%;">操作</th>
                        </tr> 
                    </thead>
                    <tbody>
                        <#if bannerTemplateList ??>
                        <#list bannerTemplateList as bannerTemplate>
                        <tr id="tbodyTr">
                            <td class="tbodyTd"><div class="checkboxStyleTd" id="${bannerTemplate.id!}"></div></td>
                            <td class="tbodyTd">${bannerTemplate.id!}</td>
                            <td class="tbodyTd">
                            <img src='http://img.adinall.com/dsp${bannerTemplate.path!}' width="150" height="60" >
                            </td>
                            <td class="tbodyTd" style="text-align:left;">
                                <div class="input-group-td" id="input-group-td-first"><input class="input-text-edit" value="${bannerTemplate.name!}" title="${bannerTemplate.name!}" valueId="${bannerTemplate.id!}" disabled="true"/></div>
                            </td>
                            <td class="tbodyTd">${bannerTemplate.width!}x${bannerTemplate.height!}</td>
                            <td class="tbodyTd"><#if bannerTemplate.type == 1>Flash<#elseif bannerTemplate.type == 2>图片<#else>视频</#if></td>
                            <td class="tbodyTd"><a href="${ctx}/advertiser/main/ad/banner-template/update?bannerTemplateId=${bannerTemplate.id!}" class="tableTdStyle">${bannerTemplate.updated!?datetime}</a></td>
                            <td class="tbodyTd"><#if bannerTemplate.status==0>开启<#else>停用</#if></td>
                            <td class="tbodyTd">
                                <div id="listButtons">
                                    <a class="btn3" id="btn-editName" value="${bannerTemplate.id!}">修改名称</a>
                                    <#if bannerTemplate.status==0>
                                    <a id="btn-disable" value="${bannerTemplate.id!}" class="btn3">停用</a>
                                    <#elseif bannerTemplate.status==1>
                                    <a id="btn-enable" value="${bannerTemplate.id!}" class="btn3">开启</a>
                                    </#if>
                                    <a id="btn-delete" value="${bannerTemplate.id!}" class="btn3">删除</a>
                                </div>
                            </td>
                        </tr>
                        </#list>
                        </#if>
                    </tbody>
                </table>
                <div id="exportReport">
                    <a id="exportExcel" class="btn_export" href="javascript:void(0);" onclick="exportExcel_list()">导出Excel</a>
                </div>
                <div id="pageDiv">
                    <#include "/common/pagination/simple.ftl"/>
                </div>
            </form>
        </div>
    </div>
</div>
</@override>
<@extends name="/common/simple.ftl"/>